﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using KC.Framework.Extension;
using KC.Framework.Tenant;
using KC.DTO.Core;
using ProtoBuf;

namespace KC.DTO.Admin
{
    [Serializable, DataContract(IsReference = true)]
    [ProtoContract]
    public class TenantSimpleDTO : EntityBaseDTO
    {
        [DataMember]
        [ProtoMember(1)]
        public int TenantId { get; set; }

        /// <summary>
        ///  Client's MemberId
        /// </summary>
        [DataMember]
        [ProtoMember(2)]
        public string TenantName { get; set; }
        [DataMember]
        [ProtoMember(3)]
        public string TenantDisplayName { get; set; }

        /// <summary>
        ///  统一社会信用代码
        /// </summary>
        [DataMember]
        [ProtoMember(40)]
        public string OrgUSCC { get; set; }

        /// <summary>
        /// 组织机构代码证
        /// </summary>
        [DataMember]
        [ProtoMember(41)]
        public string OrgCode { get; set; }

        [DataMember]
        [ProtoMember(5)]
        public string ContactName { get; set; }
        [DataMember]
        [ProtoMember(6)]
        public string ContactEmail { get; set; }
        [DataMember]
        [ProtoMember(7)]
        public string ContactPhone { get; set; }

        [DataMember]
        [ProtoMember(8)]
        public TenantType TenantType { get; set; }

        [DataMember]
        [ProtoMember(44)]
        public CloudType CloudType { get; set; }

        [DataMember]
        [ProtoMember(48)]
        public TenantVersion Version { get; set; }
        [DataMember]
        //[ProtoMember(62)]
        public string TenantTypeString { get { return TenantType.ToDescription(); } }
        [DataMember]
        //[ProtoMember(49)]
        public string VersionString { get { return Version.ToDescription(); } }

        [DataMember]
        //[ProtoMember(50)]
        public string CloudTypeString { get { return CloudType.ToDescription(); } }

        [DataMember]
        [ProtoMember(58)]
        public string OwnDomainName { get; set; }
        [DataMember]
        [ProtoMember(59)]
        public DomainLevel OwnDomainLevel { get; set; }
        [DataMember]
        [ProtoMember(60)]
        public string NickName { get; set; }
        [DataMember]
        [ProtoMember(61)]
        public DateTime? NickNameLastModifyDate { get; set; }


        [DataMember]
        [ProtoMember(63)]
        public bool IsEnterprise { get; set; }

        [DataMember]
        [ProtoMember(58)]
        public DatabaseType DatabaseType { get; set; }
        [DataMember]
        [ProtoMember(59)]
        public StorageType StorageType { get; set; }
        [DataMember]
        [ProtoMember(60)]
        public QueueType QueueType { get; set; }
        [DataMember]
        [ProtoMember(61)]
        public NoSqlType NoSqlType { get; set; }
        [DataMember]
        [ProtoMember(62)]
        public DistributedMessageType DistributedMessageType { get; set; }
    }
}
